package org.xwb;

import reactor.core.publisher.Flux;

import java.util.concurrent.TimeUnit;

public class Retry {
    public static void main(String[] args) {
//        Flux.range(1, 10)
        Flux.just(1,2,3,4,0,6,7)
                .map(e-> 10/e)
                .retry(1)
                .subscribe(System.out::println);

        try {
            TimeUnit.SECONDS.sleep(20);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
